# coding:utf-8

# 6、python实现列表去重的方法

# 1 set()
l = [1, 2, 34, 6, 6, 1]
l = list(set(l))
print(l)  # [1, 2, 34, 6]

# 2 for
ll = []
for i in l:
    if i not in ll:
        ll.append(i)
print(ll)  # [1, 2, 34, 6]
